<?php
class Articles_Model_Articles {
	
	public $articlesData;
	
	public function __construct(){
		
		$this->articlesData = new Articles_Data_Articles();
		
	}
	
	public function getArticles(array $getVars){
		
		if(isset($getVars['page'])){
			
			$page = $getVars['page'];
			
			$article = $this->articlesData->getArticle($page);
			
			return $article;
			
		}
		else {
			
			$article = $this->articlesData->getAllArticles();
			return $article;
			
		}
		
	}
	
	
}